<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>New customer registration</title>

<script type="text/javascript" language="JavaScript"><!--

function kontrola()
{
	var cell = self.document.forms.form1.cellnum.value;
	var email = self.document.forms.form1.email.value;
	var bankaccount = self.document.forms.form1.bankaccount.value;
	var regpassword = self.document.forms.form1.regpassword.value;
	var regretypepassword = self.document.forms.form1.regretypepassword.value;

    var is_ok = false;
    if ((cell != "")&&(email != "")&&(bankaccount != "")&&(regpassword != "")&&(regpassword ==regretypepassword )) is_ok = true;
	

    
    
    if(is_ok) //the email structure validation
	    {
	       	var at="@"
		var dot="."
		var lat=email.indexOf(at)
		var lstr=email.length
		var ldot=email.indexOf(dot)

		if (email.indexOf(at)==-1)	   is_ok = false;
		if (email.indexOf(at)==-1 || email.indexOf(at)==0 || email.indexOf(at)==lstr) is_ok = false;
		if (email.indexOf(dot)==-1 || email.indexOf(dot)==0 || email.indexOf(dot)==lstr) is_ok = false;
		if (email.indexOf(at,(lat+1))!=-1)   is_ok = false;
		if (email.substring(lat-1,lat)==dot || email.substring(lat+1,lat+2)==dot)   is_ok = false;
		if (email.indexOf(dot,(lat+2))==-1) is_ok = false;
		if (email.indexOf(" ")!=-1)  is_ok = false;
	    }
    
	if (is_ok == false) alert('Sorry but something is wrong or missing!');
    return is_ok; }
// -->
</script>


<style type="text/css">
<!--
.style5 {color: #0066FF; font-size: 24px; font-family: Arial, Helvetica, sans-serif; font-weight: bold; }
.style7 {
	font-size: 24px;
	font-family: Arial, Helvetica, sans-serif;
	color: #0066FF;
}
.style8 {
	font-size: 24px;
	font-family: Arial, Helvetica, sans-serif;
	color: #FFFFFF;
}
.style12 {
	font-size: 18;
}
.style17 {font-size: 16px}
.style18 {font-family: Arial, Helvetica, sans-serif}
.style20 {color: #FFFFFF}
-->
</style>
</head>

<body>
<p><img src="pics/main_logo_with_text_1010x12.gif" width="1010" height="124" /></p>
<table width="100%" border="0">
  <tr>
    <td colspan="2" align="left" bgcolor="#FF9900"><blockquote>
      <p><span class="style5"> Register new customer :-)</span></p>
    </blockquote></td>
  </tr>
  <tr>
    <td width="25%" rowspan="3" align="center" valign="top"><div align="left">
      <blockquote>&nbsp; </blockquote>
    </div>      <blockquote>
      <p align="left" class="style7">Fill up all * marked points please</p>
    </blockquote></td>
    <td width="75%" valign="top" bgcolor="#FF9900"><div align="center" class="style8">
      <p class="style12">
        <label></label><span class="style17">
        <label></label> 
          </span></p>
      <form  name="form1" onSubmit="return kontrola();" action="createaccount.php" method="post"  class="style12">
        <table width="322" border="0">
          <tr>
            <td width="7"><div align="right"><span class="style17">*</span></div></td>
            <td width="149"><div align="right"><span class="style17">cell number</span></div></td>
            <td width="152"><label>
              <input name="cellnum" type="text" id="cellnum" value="" maxlength="20" />
            </label></td>
          </tr>
          <tr>
            <td><div align="right"></div></td>
            <td><div align="right"><span class="style17">first name</span></div></td>
            <td><label>
              <input name="firstname" type="text" id="firstname" value="" maxlength="30" />
            </label></td>
          </tr>
          <tr>
            <td><div align="right"></div></td>
            <td><div align="right"><span class="style17">last name</span></div></td>
            <td><label>
              <input name="lastname" type="text" id="lastname" value="" maxlength="30" />
            </label></td>
          </tr>
          <tr>
            <td><div align="right"><span class="style17">*</span></div></td>
            <td><div align="right"><span class="style17">email</span></div></td>
            <td><label>
              <input name="email" type="text" id="email" value="" maxlength="50" />
            </label></td>
          </tr>
          <tr>
            <td><div align="right"></div></td>
            <td><div align="right"><span class="style17">year of birth</span></div></td>
            <td><label>
              <input name="yearofbirth" type="text" id="yearofbirth" value="" maxlength="4" />
              </label></td>
          </tr>
          <tr>
            <td>&nbsp;</td>
            <td><div align="right"><span class="style17">gender</span></div></td>
            <td align="center" valign="middle"><p class="style17">
              <label>
               	  <input type="radio" name="gender" value="f" id="gender_0" checked="checked"/>
                girl</label>
              <label>
                <input name="gender" type="radio" id="gender_1" value="m"  />
                boy</label>
              <br />
            </p>              
              <label></label></td>
          </tr>
          <tr>
            <td><div align="right"><span class="style17">*</span></div></td>
            <td><div align="right"><span class="style17">bank account number</span></div></td>
            <td><label>
              <input name="bankaccount" type="text" id="bankaccount" value="" maxlength="30" />
            </label></td>
          </tr>
          <tr>
            <td><div align="right"><span class="style17">*</span></div></td>
            <td><div align="right"><span class="style17">password</span></div></td>
            <td><label>
              <input name="regpassword" type="password" id="regpassword" value="" maxlength="30" />
            </label></td>
          </tr>
          <tr>
            <td><div align="right"><span class="style17">*</span></div></td>
            <td><div align="right"><span class="style17">retype password</span></div></td>
            <td><label>
              <input name="regretypepassword" type="password" id="regretypepassword" value="" maxlength="30" />
            </label></td>
          </tr>
          <tr>
            <td><div align="right"></div></td>
            <td><div align="right"></div></td>
            <td><label>
              <div align="center">
                <input type="submit" name="send2" id="send2" value="submit" />
                <input type="reset" name="reset" id="reset" value="reset" />
              </div>
            </label></td>
          </tr>
        </table>
        <div align="left"></div>
        <p>&nbsp;</p>
        <p>&nbsp;</p>
        </form>
      </div>      </td>
  </tr>
  <tr>
    <td bgcolor="#FF9900" class="style12"><div align="center" class="style18">
      <p class="style12"><span class="style20">or contact us at</span> <a href="mailto:psi2@iot.sdu.dk?subject=Write the cubject&body=Here describe your situation..." class="style20">psi2@iot.sdu.dk</a></p>
    </div></td>
  </tr>
  
  
  
  
  
  
</table>
</body>
</html>
